/*    */ package com.openbravo.pos.forms;
/*    */ 
/*    */ import com.openbravo.data.loader.Session;
/*    */ import com.openbravo.data.loader.SessionDB;
/*    */ 
/*    */ public class BeanFactoryData
/*    */   implements BeanFactoryApp
/*    */ {
/*    */   private BeanFactoryApp bf;
/*    */ 
/*    */   public void init(AppView app)
/*    */     throws BeanFactoryException
/*    */   {
/*    */     try
/*    */     {
/* 38 */       String sfactoryname = getClass().getName();
/* 39 */       if (sfactoryname.endsWith("Create")) {
/* 40 */         sfactoryname = sfactoryname.substring(0, sfactoryname.length() - 6);
/*    */       }
/* 42 */       this.bf = ((BeanFactoryApp)Class.forName(sfactoryname + app.getSession().DB.getName()).newInstance());
/* 43 */       this.bf.init(app);
/*    */     } catch (Exception ex) {
/* 45 */       throw new BeanFactoryException(ex);
/*    */     }
/*    */   }
/*    */ 
/*    */   public Object getBean() {
/* 50 */     return this.bf.getBean();
/*    */   }
/*    */ }

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.forms.BeanFactoryData
 * JD-Core Version:    0.6.0
 */